import {createRouter, createWebHistory} from "vue-router";
import type {RouteRecordRaw, _RouteRecordBase} from "vue-router";

declare module 'vue-router' {
    interface _RouteRecordBase {
        hidden?: boolean | string | number
    }
}
const routes: RouteRecordRaw[] = [
    {
        path: "/",
        // redirect:'/test',
        component: () => import("@/views/layout/index.vue"),
        name: "layout",
        meta: {title: "layout"},
        hidden: false,
        children: [
            {
                path: "singers",
                component: () => import("@/views/singers/index.vue"),
                name: "singers",
                meta: {title: "singers"},
                // hidden: false,
            },
            {
                path: "songList",
                component: () => import("@/views/songList/index.vue"),
                name: "songList",
                meta: {title: "songList"},
                // hidden: false,
            },
            {
                path: "musicPavilion",
                component: () => import("@/views/musicPavilion/index.vue"),
                name: "musicPavilion",
                meta: {title: "musicPavilion"},
                // hidden: false,
            }
        ]
    },
    {
        path: "/login",
        component: () => import("@/views/login/login.vue"),
        name: "login",
        meta: {title: "login"},
        hidden: false,
    },

];
const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
